package com.rlyy.common.enums;

/**
 * @author yuanqinglong
 * @since 2020/6/9 15:58
 */
public enum  CommonEnum implements ExceptionEnum {

    /**
     * 参数不足
     */
    VERIFICATION_CODE_ERROR( 2000,"验证码错误") ,
    APP_ID_IS_EMPTY( 2001,"APPID为空") ,
    OPEN_ID_IS_EMPTY( 2002,"OPENID为空") ,
    SUCCESSFULLY( 200,"成功") ,
    FAILED( 400,"失败") ,
    ILLEGAL_OPERATION( 2005,"非法操作") ,
    APP_ID_WRONG_TYPE( 2006,"APPID类型错误") ,
    NO_MODIFICATIONS_ENTERED( 2012,"未输入修改项") ,
    PARAMS_NOT_ENOUGH( 2013,"参数不足"),
    SERVER_IS_BUSY( 2014,"服务器繁忙") ,
    REQUEST_NOT_SUPPORTED( 2015,"不支持此请求方式") ,
    NOT_FOUND_API( 404,"找不到api") ;


    private final String msg;
    private final Integer code;

    CommonEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }


    @Override
    public Integer getCode() {
        return this.code;
    }

    @Override
    public String getMsg() {
        return this.msg;
    }


}
